{% extends "toast/base.template.html" %}
{% load toast_filters %}


{% block breadcrumbs %}
	<li class="active">Sounds</li>
{% endblock %}


{% block sidecontent %}
	<p class="lead">Register Sound</p>
	<form method="POST" action="/toast/sound/add/">
	{% csrf_token %}
		<h6>{{ form.name.label }}</h6>
		{{ form.name }}
		<p class="text-error">{{ form.name.errors.as_text }}</p>

		<input class="btn btn-primary" type="submit" name="sound_add" value="Register Sound" />
	</form>
{% endblock %}


{% block content %}
{% if list_of_sounds %}
	<table class="table">
		<thead>
		<tr>
			<th>Sound</th>
			<th>Action(s)</th>
		</tr>
		</thead>
		<tbody>
		{% for sound in list_of_sounds %}
		<tr>
			<td>{{ sound.name }}</td>
			<td>
			<div class="btn-group pull-right">
				<a class="btn btn-primary" href="#"><i class="icon-wrench icon-white"></i> Actions</a>
				<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
				<ul class="dropdown-menu">
					<li><a href="/toast/sound/view/{{ sound.id }}"><i class="icon-eye-open"></i> View</a></li>
					<li><a href="/toast/sound/edit/{{ sound.id }}"><i class="icon-pencil"></i> Edit</a></li>
					<li><a href="/toast/sound/delete/{{ sound.id }}" class="confirm" message="Are you sure you want to delete the sound {{ sound.name }}?"><i class="icon-trash"></i> Delete</a></li>
				</ul>
			</div>
			<div class="clearfix"></div>
			</td>
		</tr>
		{% endfor %}
		</tbody>
	</table>
{% else %}
	<p class="text-info">No sounds were found.</p>
{% endif %}
{% endblock %}